import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/sini/admin/auth/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/sini/admin/auth/info',
    method: 'get',
    params: {}
  })
}

export function updateInfo(data) {
  return request({
    url: '/sini/admin/admin/updateinfo',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/sini/admin/auth/logout',
    method: 'post',
  })
}

export function userList(params) {
  return request({
    url: '/sini/admin/user/userAll',
    method: 'get',
    params
  })
}

export function userShareList(params) {
  return request({
    url: '/sini/admin/user/userShare',
    method: 'get',
    params
  })
}
export function selectBycode (params) {
  return request({
    url: '/sini/admin/couponExchange/selectBycode',
    method: 'get',
    params
  })
}
export function change (params) {
  return request({
    url: '/sini/admin/couponExchange/change',
    method: 'get',
    params
  })
}